home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / bash / bash_1135 / bash1135.zoo / bash-1.13.5 / lib / readline / Makefile-ST
Encoding:
Makefile  |  1994-03-16  |  4.1 KB  |  130 lines

  1. ## -*-text-*- ######################################################
  2. #                                   #
  3. # Makefile for the GNU Readline and History Libraries.           #
  4. #                                   #
  5. ####################################################################
  6.  
  7. # Got this from make -f bash-Makefile
  8. CFLAGS= -DHAVE_ALLOCA -DHAVE_UID_T -DHAVE_BCOPY -D_BSD_SOURCE \
  9.     -DHAVE_DIRENT -DHAVE_DIRENT_H -DHAVE_STRING_H -DHAVE_VARARGS_H \
  10.     -DHAVE_STRCHR -Datarist -DMiNT -DHAVE_UNISTD_H -DHAVE_LIMITS_H \
  11.     -DHAVE_STDLIB_H -DSHELL -DEAGAIN=EREAD \
  12.     -I$../.. -I$../ \
  13.     -mpcrel -mbaserel -O2 -fomit-frame-pointer
  14. CPPFLAGS=-I. -I./lib/
  15. LDFLAGS=-mbaserel
  16. RANLIB=ar s
  17. AR=ar
  18. CC=gcc
  19. RM=rm -f
  20. # END OF PARAMETERS
  21. # This Makefile is hand made from a template file, found in
  22. # ../template.  Each library must provide several Makefile
  23. # targets: `all', `clean', `documentation', `install', and
  24. # `what-tar'.  The `what-tar' target reports the names of the
  25. # files that need to be included in a tarfile to build the full
  26. # code and documentation for this library.
  27.  
  28. # Please note that the values for INCLUDES, CC, AR, RM, CP,
  29. # RANLIB, and selfdir are passed in from ../Makefile, and do
  30. # not need to be defined here.
  31.  
  32. # Here is a rule for making .o files from .c files that doesn't force
  33. # the type of the machine (like -sun3) into the flags.
  34. .c.o:
  35.     $(CC) -c $(CFLAGS) $(INCLUDES) $(LOCAL_DEFINES) $(CPPFLAGS) $*.c
  36.  
  37. # LOCAL_DEFINES are flags that are specific to this library.
  38. # Comment out "-DVI_MODE" if you don't think that anyone will ever desire
  39. # the vi line editing mode and features.  Define -DUSG if you are using a
  40. # System V operating system.
  41. LOCAL_DEFINES = $(LOCAL_INCLUDES) #-DVI_MODE #-DUSG
  42.  
  43. # Some systems need to define this (like older NeXT systems) in order
  44. # to prevent namespace conflicts.
  45. #CFLAGS = # -DSTATIC_MALLOC
  46.  
  47. # For libraries which include headers from other libraries.
  48. LOCAL_INCLUDES = -I. -I../
  49.  
  50. # The name of the main library target.
  51. LIBRARY_NAME = readline.olb
  52.  
  53. # The C code source files for this library.
  54. CSOURCES = readline.c funmap.c keymaps.c vi_mode.c parens.c \
  55.        rltty.c complete.c bind.c isearch.c display.c signals.c \
  56.        emacs_keymap.c vi_keymap.c history.c tilde.c xmalloc.c
  57.  
  58. # The header files for this library.
  59. HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h \
  60.        posixstat.h tilde.h
  61.  
  62. OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
  63.       rltty.o complete.o bind.o isearch.o display.o signals.o \
  64.       history.o tilde.o xmalloc.o
  65.  
  66. # The texinfo files which document this library.
  67. DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
  68. DOCOBJECT = doc/readline.dvi
  69. DOCSUPPORT = doc/Makefile
  70. DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
  71.  
  72. SUPPORT = Makefile ChangeLog $(DOCSUPPORT) examples/[-a-z.]*
  73.  
  74. SOURCES  = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
  75.  
  76. THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
  77.  
  78. ##########################################################################
  79.  
  80. all: readline.olb history.olb
  81.  
  82. readline.olb: $(OBJECTS)
  83.     $(RM) -f $@
  84.     $(AR) cq $@ $(OBJECTS)
  85.     $(RANLIB) $@
  86.  
  87. history.olb: history.o
  88.     $(RM) -f $@
  89.     $(AR) cq $@ history.o
  90.     $(RANLIB) $@
  91.  
  92. what-tar:
  93.     @for file in $(THINGS_TO_TAR); do \
  94.       echo $(selfdir)$$file; \
  95.     done
  96.  
  97. documentation: force
  98.     (cd doc; make)
  99. force:
  100.  
  101. # The rule for 'includes' is written funny so that the if statement
  102. # always returns TRUE unless there really was an error installing the
  103. # include files.
  104. install:
  105.     if [ -r $(incdir)/readline ]; then \
  106.       :; \
  107.     else \
  108.       mkdir $(incdir)/readline && chmod a+r $(incdir)/readline; \
  109.     fi
  110.     $(CP) readline.h keymaps.h chardefs.h history.h $(incdir)/readline/
  111.     -mv $(bindir)/readline.olb $(bindir)/readline.old
  112.     cp readline.olb $(bindir)/readline.olb
  113. #    if [ -f "$(RANLIB)" ]; then $(RANLIB) -t $(bindir)/libreadline.a; fi
  114.  
  115. clean:
  116.     rm -f $(OBJECTS) *.olb
  117.     (cd doc; make clean)
  118.  
  119. readline: readline.h rldefs.h chardefs.h
  120. readline: $(OBJECTS)
  121.     $(CC) $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  122.       $(LOCAL_INCLUDES) -DTEST -o readline readline.c vi_mode.o funmap.o \
  123.       keymaps.o -ltermcap
  124.  
  125. readline.o: readline.c readline.h rldefs.h chardefs.h
  126. readline.o: keymaps.h history.h
  127. vi_mode.o:  vi_mode.c
  128. funmap.o:   funmap.c readline.h
  129. keymaps.o:  keymaps.c emacs_keymap.c vi_keymap.c keymaps.h chardefs.h
  130.